
package org.darcy.entity.privilege;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Schema(description = "SysUser: 系统用户")
@TableName(value = "sys_user")
@Getter
@Setter
public class SysUser implements Serializable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "主键")
	@TableId(type = IdType.AUTO)
	private Integer id;

	@Schema(description = "用户名")
	@TableField(value = "`username`")
	private String username;

	@Schema(description = "密码")
	@TableField(value = "`password`")
	private String password;

	@Schema(description = "昵称")
	@TableField(value = "`nick_name`")
	private String nickName;

	@Schema(description = "真实姓名")
	@TableField(value = "`real_name`")
	private String realName;

	@Schema(description = "手机")
	@TableField(value = "`mobile`")
	private String mobile;

	@Schema(description = "邮箱")
	@TableField(value = "`email`")
	private String email;

	@Schema(description = "头像")
	@TableField(value = "`image`")
	private Integer image;

	@Schema(description = "初始密码是否已修改 1是0否")
	@TableField(value = "`pwd_init`")
	private Integer pwdInit;

	@Schema(description = "第三方账号，如微信、钉钉等")
	@TableField(value = "`third_party`")
	private String thirdParty;

	@Schema(description = "创建时间")
	@TableField(value = "`create_time`")
	private Date createTime;

	@Schema(description = "更新时间")
	@TableField(value = "`update_time`")
	private Date updateTime;

	@Schema(description = "删除标识  0标识已删除   1标识未删除")
	@TableField(value = "`del_flag`")
	private Integer delFlag;

	//

	@Schema(description = "头像url")
	@TableField(exist = false)
	private String imageUrl;

	@Schema(description = "头像内容，base64格式，前端传入")
	@TableField(exist = false)
	private String imageBase64Content;

	// 临时变量:部门名称
	@TableField(exist = false)
	private String deptName;

	// 临时变量:账户失效时间str
	@TableField(exist = false)
	private String failureTimeStr = "-";

	// 临时变量:密码过期时间str
	@TableField(exist = false)
	private String pwdFtimeStr = "-";

	@TableField(exist = false)
	private String keyword;

	/**
	 * 临时变量:是否失效标识 1失效，0未失效 ,2未设置失效时间
	 */
	@TableField(exist = false)
	private Integer failFlag;

	@TableField(exist = false)
	private List<SysRole> groups;

	@Schema(description = "多个角色id，逗号分隔")
	@TableField(exist = false)
	private String roleId;

}
